package com.service.lotterySystem.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author ：hjl
 * @date ：Created in 2022/01/14 10:08
 * @description：
 */

public class CronUtil {

    public static String getCron(Date date) {
        String dateFormat = "ss mm HH dd MM ? yyyy";

        SimpleDateFormat sdf = new SimpleDateFormat(dateFormat);
        String formatTimeStr = null;
        if (date != null) {
            formatTimeStr = sdf.format(date);
        }
        return formatTimeStr;
    }
}
